CKEDITOR.plugins.add('insertcode', {
    requires: ['dialog'],
    init: function (a) {
        var b = a.addCommand('insertcode', new CKEDITOR.dialogCommand('insertcode'));
        a.ui.addButton('insertcode', {
            label: a.lang.insertcode.toolbar,
            command: 'insertcode',
            icon: this.path + '/images/code.gif'
        });
        CKEDITOR.dialog.add('insertcode', this.path + 'dialogs/insertcode.js');
        CKEDITOR.scriptLoader.load( [this.path +'dialogs/Script/shCore.js',
                                     this.path +'dialogs/Script/shXml.js',
                                     this.path +'dialogs/Script/shCpp.js',
                                     this.path +'dialogs/Script/shCSharp.js',
                                     this.path +'dialogs/Script/shCss.js',
                                     this.path +'dialogs/Script/shJava.js',
                                     this.path +'dialogs/Script/shJScript.js',
                                     this.path +'dialogs/Script/shPhp.js',
                                     this.path +'dialogs/Script/shPython.js',
                                     this.path +'dialogs/Script/shRuby.js',
                                     this.path +'dialogs/Script/shSql.js',
                                     this.path +'dialogs/Script/shVb.js'
                                     ], 
        		
        		function( completed, failed  )
	    	    {
        			alert( 'Number of scripts loaded: ' + completed.length );
        			alert( 'Number of failures: ' + failed.length );
	    	    });
    }
});